<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class CreateShopAttributeCategory extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('shop_attribute_category', function (Blueprint $table) {
            $table->id();
            $table->string('name', 32)->default('')->comment('分类属性名称');
            $table->tinyInteger('type')->default(0)->comment('类型 1-单选 2-多选');
            $table->tinyInteger('isEdit')->default(0)->comment('是否可编辑 默认0-不可编辑 1-可编辑');
            $table->unsignedInteger('createdAt')->default(0)->comment('创建时间');
            $table->unsignedInteger('createdByUid')->default(0)->comment('创建人');
            $table->unsignedInteger('updatedAt')->default(0)->comment('修改时间');
            $table->unsignedInteger('updatedByUid')->default(0)->comment('修改人');
            $table->unsignedInteger('isDeleted')->default(0);

            $table->collation = 'utf8mb4_general_ci';
            $table->comment = '门店属性表';
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('shop_attribute_category');
    }
}
